using UnityEngine;

namespace RGuang.PlathformCtrl
{

    public class OneParameterEventChannel<T> : ScriptableObject
    {

        event System.Action<T> Delegate;

        public void Broadcast(T args)
        {
            Delegate?.Invoke(args);
        }
        public void AddListener(System.Action<T> action)
        {
            Delegate += action;
        }
        public void RemoveListener(System.Action<T> action)
        {

            Delegate -= action;
        }
    }
}

